Skip to content

Upgrading to nb-javac from JDK 27b23#9413

Open
lahodaj wants to merge 18 commits into
apache:masterfrom
lahodaj:jdk27
Open

Upgrading to nb-javac from JDK 27b23#9413
lahodaj wants to merge 18 commits into
apache:masterfrom
lahodaj:jdk27

Conversation

@lahodaj
Copy link
Copy Markdown
Contributor

@lahodaj lahodaj commented May 29, 2026


^Add meaningful description above

Click to collapse/expand PR instructions

By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -

  • are all your own work, and you have the right to contribute them.
  • are contributed solely under the terms and conditions of the Apache License 2.0 (see section 5 of the license for more information).

Please make sure (eg. git log) that all commits have a valid name and email address for you in the Author field.

If you're a first time contributor, see the Contributing guidelines for more information.

If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.

PR approval and merge checklist:

  1. Was this PR correctly labeled, did the right tests run? When did they run?
  2. Is this PR squashed?
  3. Are author name / email address correct? Are co-authors correctly listed? Do the commit messages need updates?
  4. Does the PR title and description still fit after the Nth iteration? Is the description sufficient to appear in the release notes?

If this PR targets the delivery branch: don't merge. (full wiki article)

@lahodaj lahodaj added this to the NB31 milestone May 29, 2026
@lahodaj lahodaj added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) ci:all-tests [ci] enable all tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels May 29, 2026
@mbien
Copy link
Copy Markdown
Member

mbien commented May 29, 2026

suggestion:

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 20f9322..b94eb02 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1470,10 +1470,10 @@
     timeout-minutes: 60
     strategy:
       matrix:
-        java: [ '21', '26' ]
+        java: [ '21', '27-ea' ]
         config: [ 'batch1', 'batch2' ]
         exclude:
-          - java: ${{ github.event_name == 'pull_request' && 'nothing' || '26' }}
+          - java: ${{ github.event_name == 'pull_request' && 'nothing' || '27-ea' }}
       fail-fast: false
     steps:

the hints job was skipped in #9402 since it had to wait for the nb-javac update

@mbien
Copy link
Copy Markdown
Member

mbien commented Jun 1, 2026

i think the cleanup job failure can be ignored. The required permission seems to be only propagated after rebase.

Details
GITHUB_TOKEN Permissions
  Actions: read
  Metadata: read

should be


GITHUB_TOKEN Permissions
  Actions: write
  Metadata: read

edit: reverted to the old action, should work again

@mbien
Copy link
Copy Markdown
Member

mbien commented Jun 2, 2026

indexer smoke test worked, but there seems to be performance regression somewhere

NB30: INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 461,553 ms.
PR:   INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 557,659 ms.

however, the smoke test (which opens all NB modules and waits for indexer) isn't great for benchmarks since the order the projects load isn't fixed i believe. A single big project would be better.

@lahodaj
Copy link
Copy Markdown
Contributor Author

lahodaj commented Jun 3, 2026

I did a few runs, and I don't think (or at least don't see) a real regression. On master, if I do:

$ ls <netbeans-checkout>/*/*/nbproject/project.xml | cut -d '/' -f 1-8 | xargs ./nbbuild/netbeans/bin/netbeans --userdir /tmp/nbuser.index  --open
grep "Indexing finished, indexing took" /tmp/nbuser.index/var/log/messages.log

I get, for example:

INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 667 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 633 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 636 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 676 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 664 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 634 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 656 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 674 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 625 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 639 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 649 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 618 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 651 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 630 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 623 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 617 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 640 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 644 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 712 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 631 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 659,608 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 26 ms.

which totals to ~672s. I.e. there are multiple indexing happening. If I did the same with this branch, I got:

INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 2,869 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 15,178 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 871 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 23,191 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 9,741 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 75,828 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 629 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 20,807 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 3,039 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 1,441 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 21,021 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 10,019 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 8,297 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 15,268 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 451,250 ms.
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 37 ms.

which totals to ~659s. But I've seen a different numbers in different runs, we just can't (sadly) take the last and/or biggest number, I think. Unless we can somehow make sure everything is opened and setup and only then indexing starts(?).

Or do I miss something?

@lahodaj lahodaj marked this pull request as ready for review June 3, 2026 15:14
@mbien
Copy link
Copy Markdown
Member

mbien commented Jun 3, 2026

yeah we would need a better benchmark to track indexer performance. I used the NB repo as smoke test for the indexer since it did find issues in past. But it isn't great for benchmarks since I believe the scan order won't be deterministic. Lets ignore that for now.

But good that you got more consistent results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:all-tests [ci] enable all tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants